﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Net.Sockets;


using zbus;
using zbus.net; 

namespace zbus
{

    class MyHandler : MessageHandler
    {
        public void Handle(Message msg, Consumer consumer)
        {
            System.Console.WriteLine(msg);
        }
    }

    class ConsumerTest
    {
        public static void Main(string[] args)
        { 
            BrokerConfig config = new BrokerConfig();
            config.brokerAddress = "127.0.0.1:15555";
            Broker broker = new SingleBroker(config);


            Consumer c = new Consumer(broker, "MyMQ");

            c.OnMessage(new MyHandler());
            c.Start();

        }
    }
}
